package org.lee.validate.custom.annotation;

import org.lee.validate.custom.AgeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Age
 *
 * @author dralee
 * @date 2021-12-24 15:17:33
 **/
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = AgeValidator.class)
public @interface Age {

    String message() default "年龄不合法";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
